<template>
  <div class="box">
        <parent v-if="post.parent" :post="post.parent" @reqlyS="req" />
      <div class="one">
        <div class="user">
            <span>{{post.user.nickname}}</span><samp>两小时前</samp><div class="text" @click="reqlyS">回复</div>
        </div>


        <div class="one_">
            {{post.content}}
        </div>
      </div>
  </div>
</template>

<script>
export default {
    name:'parent',
    props:['post'],
    methods:{
        reqlyS(){
            this.$emit("reqlyS",this.post.id)
        },
        req(id){
            this.$emit("reqlyS",id)
        }
    }
}
</script>

<style lang="less" scoped>
.box{
    background-color: #f7f8fa;
    .one{
        border: solid 1px rgb(131, 129, 129);
        .user{
        display: flex;
        padding: 5/360*100vw;
        span{
            font-size: 15/360*100vw;
            
        }
        samp{
            flex: 1;
            font-size: 10/360*100vw;
            padding: 2/360*100vw 0 0 5/360*100vw;
            color: #afafaf;
        }
        .text{
            font-size: 12/360*100vw;
        }
    }
    }
}
</style>